package com.ruoyi.control.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; //添加
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.control.mapper.ExcavationDataHistoryMapper;
import com.ruoyi.control.domain.ExcavationDataHistory;
import com.ruoyi.control.service.IExcavationDataHistoryService;

/**
 * 掘进数据历史Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-12-05
 */
@Service
public class ExcavationDataHistoryServiceImpl extends ServiceImpl<ExcavationDataHistoryMapper, ExcavationDataHistory> implements IExcavationDataHistoryService //修改
{
    @Autowired
    private ExcavationDataHistoryMapper excavationDataHistoryMapper;

    /**
     * 查询掘进数据历史
     * 
     * @param id 掘进数据历史主键
     * @return 掘进数据历史
     */
    @Override
    public ExcavationDataHistory selectExcavationDataHistoryById(String id)
    {
        return excavationDataHistoryMapper.selectExcavationDataHistoryById(id);
    }

    /**
     * 查询掘进数据历史列表
     * 
     * @param excavationDataHistory 掘进数据历史
     * @return 掘进数据历史
     */
    @Override
    public List<ExcavationDataHistory> selectExcavationDataHistoryList(ExcavationDataHistory excavationDataHistory)
    {
        return excavationDataHistoryMapper.selectExcavationDataHistoryList(excavationDataHistory);
    }

    /**
     * 新增掘进数据历史
     * 
     * @param excavationDataHistory 掘进数据历史
     * @return 结果
     */
    @Override
    public int insertExcavationDataHistory(ExcavationDataHistory excavationDataHistory)
    {
        return excavationDataHistoryMapper.insertExcavationDataHistory(excavationDataHistory);
    }

    /**
     * 修改掘进数据历史
     * 
     * @param excavationDataHistory 掘进数据历史
     * @return 结果
     */
    @Override
    public int updateExcavationDataHistory(ExcavationDataHistory excavationDataHistory)
    {
        excavationDataHistory.setUpdateTime(DateUtils.getNowDate());
        return excavationDataHistoryMapper.updateExcavationDataHistory(excavationDataHistory);
    }

    /**
     * 批量删除掘进数据历史
     * 
     * @param ids 需要删除的掘进数据历史主键
     * @return 结果
     */
    @Override
    public int deleteExcavationDataHistoryByIds(String[] ids)
    {
        return excavationDataHistoryMapper.deleteExcavationDataHistoryByIds(ids);
    }

    /**
     * 删除掘进数据历史信息
     * 
     * @param id 掘进数据历史主键
     * @return 结果
     */
    @Override
    public int deleteExcavationDataHistoryById(String id)
    {
        return excavationDataHistoryMapper.deleteExcavationDataHistoryById(id);
    }
}
